package com.CMC.yhdeng;

import java.io.IOException;
import java.io.Serializable;
import java.util.ArrayList;

import android.util.JsonReader;
import android.util.JsonToken;

public class UnitContent extends UnitBase implements Serializable{
	private static final long serialVersionUID = 1L;
protected ArrayList<ExamUnitContent> objs=new ArrayList<ExamUnitContent>();
private int current=0;
public ExamUnitContent getCurObj()
{
	return objs.get(current);
}
public int getCurrent() {
	return current;
}
public void setCurrent(int current) {
	this.current = current;
}
public boolean read(JsonReader reader)throws IOException
{
	reader.beginObject();
	readBaseMember(reader, "unit_id", "unit_title");
	String tag=reader.nextName();
	if(tag.compareTo("unit_content")==0)
	{
		if(reader.peek()!=JsonToken.NULL)
		{
			reader.beginArray();
			while(reader.hasNext())
			{
				ExamUnitContent euc=new ExamUnitContent();
				euc.read(reader);
				objs.add(euc);
			}
			reader.endArray();
		}else reader.nextNull();
	}
	reader.endObject();
	return true;
	
}

}
